﻿using Common.WeiXin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WeiXin
{
    public partial class actionform : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["code"] != null && Request.QueryString["code"] != "")
            {
                string code = Request.QueryString["code"].ToString();
                string openId = WeiXinHelper.GetOpenID();
                if (string.IsNullOrEmpty(openId)) return;

                //用户绑定微信

                //UsersOpenIDBLLClient bllClient = new UsersOpenIDBLLClient();
                //if (!bllClient.Exists(openId))
                //{
                //    UsersOpenIDEntity userEntity = new UsersOpenIDEntity();
                //    userEntity.fdUsOIOpenID = openId;
                //    userEntity.fdUsOIFromWeb = 1;
                //    bllClient.Add(userEntity);
                //}
            }
        }
    }
}